#ifndef SHA1_H
#define SHA1_H

/*
   SHA-1 in C
   By Steve Reid <steve@edmweb.com>
   100% Public Domain
 */

#include "stdint.h"

typedef struct
{
    uint32_t state[5];
    uint32_t count[2];
    unsigned char buffer[64];
} sha1_ctx_t;


void sha1_transform(uint32_t state[5], const unsigned char buffer[64]);

void sha1_init(sha1_ctx_t * context);
void sha1_update(sha1_ctx_t * context, const unsigned char *data, uint32_t len);
void sha1_final(sha1_ctx_t * context, unsigned char digest[20]);

/*
void SHA1(
    char *hash_out,
    const char *str,
    int len);
*/
#endif /* SHA1_H */
